package util

// ContainsStr 查询是否在数组中存在
func ContainsStr(a []string, x string) bool {
	for _, n := range a {
		if x == n {
			return true
		}
	}
	return false
}

func ContainInt8(a []int8, x int8) bool {
	for _, n := range a {
		if x == n {
			return true
		}
	}
	return false
}

func ContainInt(a []int, x int) bool {
	for _, n := range a {
		if x == n {
			return true
		}
	}
	return false
}

func ContainInt32(a []int32, x int32) bool {
	for _, n := range a {
		if x == n {
			return true
		}
	}
	return false
}

func ContainInt64(a []int64, x int64) bool {
	for _, n := range a {
		if x == n {
			return true
		}
	}
	return false
}

func ContainFloat64(a []float64, x float64) bool {
	for _, n := range a {
		if x == n {
			return true
		}
	}
	return false
}

func ContainFloat32(a []float32, x float32) bool {
	for _, n := range a {
		if x == n {
			return true
		}
	}
	return false
}
